package xyz.syyrjx.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * @author 大地崩坏苍蝇兽
 * @date 2023/1/14 - 18:49
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class SyyrjxRpcRemoteAddressRegistryEntity {

    private SyyrjxRpcRemoteAddress address;

    private long time;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SyyrjxRpcRemoteAddressRegistryEntity entity = (SyyrjxRpcRemoteAddressRegistryEntity) o;
        return Objects.equals(address, entity.address);
    }

    @Override
    public int hashCode() {
        return this.address.hashCode();
    }
}
